package com.yiv.yivbackend.service;

import com.yiv.yivbackend.model.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;

/**
 * @author Yivi
 * @description 针对表【user】的数据库操作Service
 * @createDate 2024-10-29 17:44:48
 */


public interface UserService extends IService<User> {

    /**
     * 用户注册
     *
     * @param userAccount   用户账户
     * @param userPassword  账户密码
     * @param checkPassword 校验码
     * @return 新用户id
     */
    long userRegistration(String userAccount, String userPassword, String checkPassword);



    /**
     * 用户登录
     *
     * @param userAccount  用户账户
     * @param userPassword  用户密码
     * @return 脱敏后的用户信息
     */
    User userLogin(String userAccount, String userPassword, HttpServletRequest request);
}
